
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>

<HEAD>
   <TITLE>eul2xf_c</TITLE>
</HEAD>

<BODY style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<A name="TOP"></A>

<table style="text-align: left; margin-left: auto; margin-right: auto; width: 800px;"
 border="0" cellpadding="5" cellspacing="2">
  <tbody>
    <tr>
      <td style="background-color: rgb(153, 153, 153); vertical-align: middle; text-align: center;">
      <div align="right"> 
      <small><small><a href="index.html">Index Page</a></small></small>
      </div>
      <b>eul2xf_c</b> </td>
    </tr>

    <tr>
      <td style="vertical-align: top;">

<small><div align="center">
<A HREF="index.html#A">A</A>&nbsp;
<A HREF="index.html#B">B</A>&nbsp;
<A HREF="index.html#C">C</A>&nbsp;
<A HREF="index.html#D">D</A>&nbsp;
<A HREF="index.html#E">E</A>&nbsp;
<A HREF="index.html#F">F</A>&nbsp;
<A HREF="index.html#G">G</A>&nbsp;
<A HREF="index.html#H">H</A>&nbsp;
<A HREF="index.html#I">I</A>&nbsp;
<A HREF="index.html#J">J</A>&nbsp;
<A HREF="index.html#K">K</A>&nbsp;
<A HREF="index.html#L">L</A>&nbsp;
<A HREF="index.html#M">M</A>&nbsp;
<A HREF="index.html#N">N</A>&nbsp;
<A HREF="index.html#O">O</A>&nbsp;
<A HREF="index.html#P">P</A>&nbsp;
<A HREF="index.html#Q">Q</A>&nbsp;
<A HREF="index.html#R">R</A>&nbsp;
<A HREF="index.html#S">S</A>&nbsp;
<A HREF="index.html#T">T</A>&nbsp;
<A HREF="index.html#U">U</A>&nbsp;
<A HREF="index.html#V">V</A>&nbsp;
<A HREF="index.html#W">W</A>&nbsp;
<A HREF="index.html#X">X</A>&nbsp;
</div></small>
       <br>
       <table style="text-align: left; width: 60%; margin-left: auto; margin-right: auto;"
       border="0" cellspacing="2" cellpadding="2">
        <tbody>
          <tr>
            <td style="width: 50%; text-align: center;">
            <small>
              <a href="#Procedure">Procedure<br></a>
              <a href="#Abstract">Abstract<br></a>
              <a href="#Required_Reading">Required_Reading<br></a>
              <a href="#Keywords">Keywords<br></a>
              <a href="#Brief_I/O">Brief_I/O<br></a>
              <a href="#Detailed_Input">Detailed_Input<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Detailed_Output">Detailed_Output<br></a>
              <a href="#Parameters">Parameters<br></a>
              <a href="#Exceptions">Exceptions<br></a>
              <a href="#Files">Files<br></a>
              <a href="#Particulars">Particulars<br></a>
              <a href="#Examples">Examples<br></a>

              </small>
              </td>
              <td style="vertical-align: top; width: 50%; text-align: center;">
              <small>               <a href="#Restrictions">Restrictions<br></a>
              <a href="#Literature_References">Literature_References<br></a>
              <a href="#Author_and_Institution">Author_and_Institution<br></a>
              <a href="#Version">Version<br></a>
              <a href="#Index_Entries">Index_Entries<br></a>
             </small>
            </td>
          </tr>
        </tbody>
</table>

<h4><a name="Procedure">Procedure</a></h4>
<PRE>
   void eul2xf_c ( ConstSpiceDouble    eulang[6],
                   SpiceInt            axisa,
                   SpiceInt            axisb,
                   SpiceInt            axisc,
                   SpiceDouble         xform [6][6] )
</PRE>
<h4><a name="Abstract">Abstract</a></h4>
<PRE>
 
   This routine computes a state transformation from an Euler angle 
   factorization of a rotation and the derivatives of those Euler 
   angles. 
 </PRE>
<h4><a name="Required_Reading">Required_Reading</a></h4>
<PRE>
 
   <a href="../req/rotation.html">ROTATION</a>
 </PRE>
<h4><a name="Keywords">Keywords</a></h4>
<PRE>
 
   ANGLES 
   STATE 
   DERIVATIVES 
 

</PRE>
<h4><a name="Brief_I/O">Brief_I/O</a></h4>
<PRE>
 
   VARIABLE  I/O  DESCRIPTION 
   --------  ---  -------------------------------------------------- 
   eulang     I   An array of Euler angles and their derivatives. 
   axisa      I   Axis A of the Euler angle factorization. 
   axisb      I   Axis B of the Euler angle factorization. 
   axisc      I   Axis C of the Euler angle factorization. 
   xform      O   A state transformation matrix. 
 </PRE>
<h4><a name="Detailed_Input">Detailed_Input</a></h4>
<PRE>
 
 
   eulang      is the set of Euler angles corresponding to the 
               specified factorization. 
 
               If we represent r as shown here: 
 
                   r =  [ alpha ]     [ beta ]     [ gamma ] 
                                 axisa        axisb         axisc 
 
               then 
 
 
                  eulang[0] = alpha 
                  eulang[1] = beta 
                  eulang[2] = gamma 
                  eulang[3] = dalpha/dt 
                  eulang[4] = dbeta/dt 
                  eulang[5] = dgamma/dt 
 
 
   axisa       are the axes desired for the factorization of r. 
   axisb       All must be in the range from 1 to 3.  Moreover 
   axisc       it must be the case that axisa and axisb are distinct 
               and that axisb and axisc are distinct. 
 
               Every rotation matrix can be represented as a product 
               of three rotation matrices about the principal axes 
               of a reference frame. 
 
                   r =  [ alpha ]     [ beta ]     [ gamma ] 
                                 axisa        axisb         axisc 
 
               The value 1 corresponds to the X axis. 
               The value 2 corresponds to the Y axis. 
               The value 3 corresponds to the Z axis. 
               
 </PRE>
<h4><a name="Detailed_Output">Detailed_Output</a></h4>
<PRE>
 
   xform       is the state transformation corresponding r and dr/dt 
               as described above.  Pictorially, 
 
                    [       |        ] 
                    |  r    |    0   | 
                    |       |        | 
                    |-------+--------| 
                    |       |        | 
                    | dr/dt |    r   | 
                    [       |        ] 
 
               where r is a rotation that varies with respect to time 
               and dr/dt is its time derivative. 
 </PRE>
<h4><a name="Parameters">Parameters</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Exceptions">Exceptions</a></h4>
<PRE>
 
   All erroneous inputs are diagnosed by routines in the call 
   tree to this routine.  These include 
 
   1)   If any of axisa, axisb, or axisc do not have values in 
 
           { 1, 2, 3 }, 
 
        then the error SPICE(INPUTOUTOFRANGE) is signaled. 
 </PRE>
<h4><a name="Files">Files</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Particulars">Particulars</a></h4>
<PRE>
 
   This function is intended to provide an inverse for the function 
   <a href="xf2eul_c.html">xf2eul_c</a>.    
 
 
   A word about notation:  the symbol 
 
      [ x ] 
           i 
 
   indicates a coordinate system rotation of x radians about the 
   ith coordinate axis.  To be specific, the symbol 
 
      [ x ] 
           1 
 
   indicates a coordinate system rotation of x radians about the 
   first, or x-, axis; the corresponding matrix is 
 
      +-                    -+ 
      |  1      0       0    | 
      |                      | 
      |  0    cos(x)  sin(x) |. 
      |                      | 
      |  0   -sin(x)  cos(x) | 
      +-                    -+ 
 
   Remember, this is a COORDINATE SYSTEM rotation by x radians; this 
   matrix, when applied to a vector, rotates the vector by -x 
   radians, not x radians.  Applying the matrix to a vector yields 
   the vector's representation relative to the rotated coordinate 
   system. 
 
   The analogous rotation about the second, or y-, axis is 
   represented by 
 
      [ x ] 
           2 
 
   which symbolizes the matrix 
 
      +-                    -+ 
      | cos(x)   0   -sin(x) | 
      |                      | 
      |  0       1      0    |, 
      |                      | 
      | sin(x)   0    cos(x) | 
      +-                    -+ 
 
   and the analogous rotation about the third, or z-, axis is 
   represented by 
 
      [ x ] 
           3 
 
   which symbolizes the matrix 
 
      +-                    -+ 
      |  cos(x)  sin(x)   0  | 
      |                      | 
      | -sin(x)  cos(x)   0  |. 
      |                      | 
      |  0        0       1  | 
      +-                    -+ 
 
 
   The input matrix is assumed to be the product of three 
   rotation matrices, each one of the form 
 
      +-                    -+ 
      |  1      0       0    | 
      |                      | 
      |  0    cos(r)  sin(r) |     (rotation of r radians about the 
      |                      |      x-axis), 
      |  0   -sin(r)  cos(r) | 
      +-                    -+ 
 
 
      +-                    -+ 
      | cos(s)   0   -sin(s) | 
      |                      | 
      |  0       1      0    |     (rotation of s radians about the 
      |                      |      y-axis), 
      | sin(s)   0    cos(s) | 
      +-                    -+ 
 
   or 
 
      +-                    -+ 
      |  cos(t)  sin(t)   0  | 
      |                      | 
      | -sin(t)  cos(t)   0  |     (rotation of t radians about the 
      |                      |      z-axis), 
      |  0        0       1  | 
      +-                    -+ 
 
   where the second rotation axis is not equal to the first or 
   third.  Any rotation matrix can be factored as a sequence of 
   three such rotations, provided that this last criterion is met. 
 
   This routine is related to the routine <b>eul2xf_c</b> which produces 
   a state transformation from an input set of axes, Euler angles 
   and derivatives. 
 
   The two function calls shown here will not change xform except for 
   round off errors. 
 
      <a href="xf2eul_c.html">xf2eul_c</a> ( xform,  axisa, axisb, axisc, eulang, &amp;unique );
      <b>eul2xf_c</b> ( eulang, axisa, axisb, axisc, xform           ); 
 
   On the other hand the two calls 
 
      <b>eul2xf_c</b> ( eulang, axisa, axisb, axisc, xform           ); 
      <a href="xf2eul_c.html">xf2eul_c</a> ( xform,  axisa, axisb, axisc, eulang, &amp;unique );
 
   will leave eulang unchanged only if the components of eulang 
   are in the range produced by <a href="xf2eul_c.html">xf2eul_c</a> and the Euler representation 
   of the rotation component of xform is unique within that range. 

 </PRE>
<h4><a name="Examples">Examples</a></h4>
<PRE>
 
   Suppose you have a set of Euler angles and their derivatives 
   for a 3 1 3 rotation, and that you would like to determine 
   the equivalent angles and derivatives for a 1 2 3 rotation. 
 
       r = [alpha]  [beta]  [gamma] 
                  3       1        3 
 
       r = [roll]  [pitch]  [yaw] 
                 1        2      3 
 
   The following code fragment will perform the desired computation. 
 
      abgang[0] = alpha; 
      abgang[1] = beta; 
      abgang[2] = gamma; 
      abgang[3] = dalpha; 
      abgang[4] = dbeta; 
      abgang[5] = dgamma; 
 
      <b>eul2xf_c</b> ( abgang, 3, 1, 3, xform  ); 
      <a href="xf2eul_c.html">xf2eul_c</a> ( xform,  1, 2, 3, rpyang, &amp;unique ); 
 
      roll     = rpyang[0]; 
      pitch    = rpyang[1]; 
      yaw      = rpyang[2]; 
      droll    = rpyang[3]; 
      dpitch   = rpyang[4]; 
      dyaw     = rpyang[5];
       
 </PRE>
<h4><a name="Restrictions">Restrictions</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Literature_References">Literature_References</a></h4>
<PRE>
 
   None. 
 </PRE>
<h4><a name="Author_and_Institution">Author_and_Institution</a></h4>
<PRE>
 
   N.J. Bachman    (JPL)
   W.L. Taber      (JPL) 
   </PRE>
<h4><a name="Version">Version</a></h4>
<PRE>
   -CSPICE Version 2.0.1, 25-APR-2007 (EDW)

      Corrected code in Examples section, example showed
      a <a href="xf2eul_c.html">xf2eul_c</a> call:
      
            <a href="xf2eul_c.html">xf2eul_c</a>( xform,  1, 2, 3, rpyang); 
       
      The proper form of the call:
      
            <a href="xf2eul_c.html">xf2eul_c</a>( xform,  1, 2, 3, rpyang, &amp;unique );

   -CSPICE Version 2.0.0, 31-OCT-2005 (NJB)

      Restriction that second axis must differ from the first
      and third was removed.

   -CSPICE Version 1.0.1, 03-JUN-2003 (EDW)

      Correct typo in Procedure line.
 
   -CSPICE Version 1.0.0, 18-MAY-1999 (WLT) (NJB)
</PRE>
<h4><a name="Index_Entries">Index_Entries</a></h4>
<PRE>
 
   State transformation from Euler angles and derivatives 
 </PRE>
<h4>Link to routine eul2xf_c source file <a href='../../../src/cspice/eul2xf_c.c'>eul2xf_c.c</a> </h4>

      </td>
    </tr>
  </tbody>
</table>

   <pre>Wed Jun  9 13:05:23 2010</pre>

</body>
</html>

